﻿@using ChampionsLeagueBets.Domain
@using MvcContrib.UI.Grid
@using MvcContrib
@model Tournament


@{
    ViewBag.Title = "Klasyfikacja: " + Model.Name;
	ViewBag.Image = "~/Content/images/dollars-64.png";

	string unitName = Model.UnitOfAccount != null && !string.IsNullOrEmpty(Model.UnitOfAccount.ShortName) ? Model.UnitOfAccount.ShortName : string.Empty;
}

<div id="content-list">
@Html.Grid(Model.TournamentUserResults.OrderByDescending( o => o.Points)).RowAttributes(data => new Hash(@class => data.IsAlternate ? "row-normal" : "row-grayed")).Columns(column => 
        {
			column.For(cust => Html.ActionLink<TournamentsController>(c => c.UserGamesView(cust.Id), cust.User.FullName));
			column.For(cust => cust.Points);
			column.For(cust => cust.Win + " " + unitName);
        }
    )
	
</div>

<div class="ui-actions">
	@(Html.ActionLink<TournamentsController>(c => c.UserTournaments(), "Anuluj", new { @class = "link-button" }))
</div>